// 处理封装从***Dao.js获取到的数据返回给Controller
const userDao = require('./../dao/userDao.js');

var getUserById = async (userId) => {
    var users = await userDao.getUserById(userId);
    console.log('user ',users)
    if(users){
        // var responseContent = '';
        // responseContent += '姓名：' + users.name + '&nbsp;|';
        // responseContent += '性别：' + users.sex + '&nbsp;|';
        // responseContent += '年龄：' + users.age + '&nbsp;|';
        // responseContent += '身高：' + users.height + '<br />';
        // console.log('responseContent ',responseContent)
        // return responseContent;
        return users
    }else {
        return null
    }
    
}

module.exports = {
    getUserById : getUserById
};